Skip to content

fix(ci): use lowercase owner in Trivy image-ref so staging scan can run#1050

Merged
ogazboiz merged 1 commit into
mainfrom
fix/deploy-staging-trivy-image-ref
Jun 1, 2026
Merged

fix(ci): use lowercase owner in Trivy image-ref so staging scan can run#1050
ogazboiz merged 1 commit into
mainfrom
fix/deploy-staging-trivy-image-ref

Conversation

@ogazboiz
Copy link
Copy Markdown
Contributor

@ogazboiz ogazboiz commented Jun 1, 2026

Why

The Deploy Staging workflow (the remaining red check on main) fails on every push at the Trivy scan:

FATAL  run error: image scan error: ... failed to parse the image name:
could not parse reference: ghcr.io/LabsCrypt/remitlend-backend:staging-<sha>

The images are built and pushed with ${{ env.OWNER_LC }} (lowercase, as OCI requires), but the two Trivy steps referenced the image via ${{ github.repository_owner }} = LabsCrypt (capitals). OCI image references must be lowercase, so Trivy can't parse the reference, exits 1, the CRITICAL step is skipped, and the upload step fails with Path does not exist: trivy-results.sarif.

Fix

Point both Trivy image-ref values at ${{ env.OWNER_LC }} so they match the pushed tags and the scan can actually run.

Note on verification

This workflow only triggers on push to main, so it can't run on this PR — it'll first execute on the post-merge run on main. The change is isolated to the Deploy Staging workflow and cannot affect the PR-gating RemitLend CI job.

…an run

The Deploy Staging workflow fails on every push to main at the Trivy scan:

  FATAL  run error: image scan error: ... failed to parse the image name:
  could not parse reference:
  ghcr.io/LabsCrypt/remitlend-backend:staging-<sha>

The images are built and pushed with ${{ env.OWNER_LC }} (lowercase, as OCI
requires), but the two Trivy steps referenced the image via
${{ github.repository_owner }}, which is "LabsCrypt" with capitals. OCI image
references must be lowercase, so Trivy could not parse the reference and exited
1; the CRITICAL step was then skipped and the upload-sarif step failed with
"Path does not exist: trivy-results.sarif".

Point both Trivy image-ref values at ${{ env.OWNER_LC }} so they match the
pushed tags and the scan can actually run.
@ogazboiz ogazboiz merged commit 24537e8 into main Jun 1, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant